Imports nsImages = KDESolutions.Providers.Images.ImageService

Partial Public Class PhotoAlbumTest
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btnAddAlbum_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddAlbum.Click
        If String.IsNullOrEmpty(txtAlbumName.Text) = False Then
            nsImages.AddAlbum(txtAlbumName.Text, True, HttpContext.Current.User.Identity.Name)
        End If
        GridView1.DataBind()
    End Sub

    Private Sub ObjectDataSource1_Deleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs) Handles ObjectDataSource1.Deleting
        e.InputParameters("Username") = HttpContext.Current.User.Identity.Name
    End Sub

    Private Sub ObjectDataSource1_Updating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs) Handles ObjectDataSource1.Updating
        e.InputParameters.Item("Username") = HttpContext.Current.User.Identity.Name
    End Sub
End Class